import React, {Component} from 'react';
import { Button, Input, Select, Table } from 'antd';
import BreadcrumbBar from '@/common/BreadcrumbBar';//面包屑组件
import ToolBar from '@/common/ToolBar';//操作栏组件

const Search = Input.Search;
const Option = Select.Option;

class Apply extends Component {
	constructor(props) {
		super(props);	
		this.state = {
			dataSource:[]
		}
		this.columns = [
            { title: '建议日期', dataIndex: 'date', },
			{ title: '建议标题', dataIndex: 'title', width: 200,},
            { title: '建议分类', dataIndex: 'category', },
            { title: '建议人', dataIndex: 'name',},
            { title: '联系电话', dataIndex: 'tel',},
			{ title: '部门', dataIndex: 'dept',},
			{ title: '提交人', dataIndex: 'commit',},
            { title: '提交时间', dataIndex: 'commitdate', },
			{ title: '状态', dataIndex: 'status',},
			{ title: '办理人', dataIndex: 'dojob',},
			{ title: '操作', dataIndex: 'operator',
				render: (text, record, index) => {
					return (
						<div>
							<Button>查看</Button>&nbsp;
                            {/* <Button>编辑</Button>&nbsp;
							<Button type="danger">删除</Button> */}
						</div>
					)
				}
			},
        ]
	}
    render() {
        return (
            <div>
		   		<BreadcrumbBar one="员工建议" two="所有建议" three="办理中" />
                <ToolBar>
					<Select defaultValue="全部" style={{ width: 120 }} onChange={this.filterBywfmStatus}>
						<Option value="0">部门审核</Option>
						<Option value="1">部门办理</Option>
						<Option value="2">工会转办</Option>
						<Option value="3">领导审批</Option>
					</Select>
					<Search placeholder="请输入姓名" 
						onSearch={this.filterByName}
						style={{ width: 200, float: 'right' }}
					/>
                </ToolBar>
				<Table 
					dataSource={this.state.dataSource} 
					// rowKey={record => record.id}
					columns={this.columns} 
					loading={false}
					pagination={{
						showTotal:(total, range) => `共 ${total} 条  显示  ${range[0]}-${range[1]} 条`
					}}
					bordered={true} 
				/>
		   </div>
        )

    }
}

export default Apply;